<?php
/*
+--------------------------------------------------------------------------
|   AffiliStore 2
|   ========================================
|   Web: http://www.affilistore.com
|   Email: admin (at) affilistore (dot) com
|	License Type: AffiliStore 2 is NOT open source software and limitations apply 
|   Licence Info: Visit AffiliStore website and click on 'Licence'
+--------------------------------------------------------------------------
*/
// checks to see if password session is set
// if not redirects to ../admin/
if($_SESSION['loggedIn'] == 0 && !isset($adminPage)){
include('auth.inc.php');
}

?>
<h1>ShopNmatch Admin</h1>
<fieldset>
<legend>Welcome <?php echo $_SESSION['as_aduser'] ?></legend>

<div class="options">
<img src="images/arrow2.gif" width="9" height="9" alt="" />&nbsp;<a href="./">Admin Home</a><br />
<img src="images/arrow2.gif" width="9" height="9" alt="" />&nbsp;<a href="index.php?ad=od">General Settings</a><br />
<img src="images/arrow2.gif" width="9" height="9" alt="" />&nbsp;<a href="index.php?ad=ud">Update Your Details</a><br />
<img src="images/arrow2.gif" width="9" height="9" alt="" />&nbsp;<a href="index.php?ad=wd">Update Your Website Details</a><br />
<img src="images/arrow2.gif" width="9" height="9" alt="" />&nbsp;<a href="index.php?ad=fd">Manage Product Feeds</a><br />
<img src="images/arrow2.gif" width="9" height="9" alt="" />&nbsp;<a href="index.php?ad=pm">Manage Payments</a><br />
<img src="images/arrow2.gif" width="9" height="9" alt="" />&nbsp;<a href="index.php?ad=cd">Build/Manage Custom Navigation</a><br />

<!-- extra features-->
<img src="images/arrow2.gif" width="9" height="9" alt="" />&nbsp;<a href="index.php?ad=ac">Manage Merchant Accounts</a><br />
<img src="images/arrow2.gif" width="9" height="9" alt="" />&nbsp;<a href="../affiliatenetwork/admin/index.php?Act=affiliates&status=all">Manage Affiliate Accounts</a><br />
<!-- extra features-->

<img src="images/arrow2.gif" width="9" height="9" alt="" />&nbsp;<a href="index.php?ad=pd">Manage Pages</a><br />
<img src="images/arrow2.gif" width="9" height="9" alt="" />&nbsp;<a href="index.php?ad=nd">Manage News</a><br />
<img src="images/arrow2.gif" width="9" height="9" alt="" />&nbsp;<a href="index.php?ad=cm">Manage Comments</a><br />
<img src="images/arrow2.gif" width="9" height="9" alt="" />&nbsp;<a href="index.php?ad=st">Manage Search Tags</a><br />
<img src="images/arrow2.gif" width="9" height="9" alt="" />&nbsp;<a href="index.php?ad=ld">Manage Reciprocal Links Directory</a><br />
<img src="images/arrow2.gif" width="9" height="9" alt="" />&nbsp;<a href="index.php?ad=cu">Create Content Units</a><br />
<img src="images/arrow2.gif" width="9" height="9" alt="" />&nbsp;<a href="index.php?ad=kg">Keyword Generator</a><br />
<img src="images/arrow2.gif" width="9" height="9" alt="" />&nbsp;<a href="../">View Your Website</a><br />
<img src="images/arrow2.gif" width="9" height="9" alt="" />&nbsp;<a href="index.php?ad=logout">Sign Out</a>
</div>

<?php if ($_GET['ad'] == 'ld' || $_GET['ad'] == 'ldu' || $_GET['ad'] == 'ldc' || $_GET['ad'] == 'lde') { ?>
<div class="suboptions">
<strong>Links Options</strong><br />
<a href="index.php?ad=ld">Manage Links</a><br />
<a href="index.php?ad=ldu">Update Your Link Details</a><br />
<a href="index.php?ad=ldc">Manage Link Categories</a><br />
<a href="index.php?ad=lde">Edit Email Templates</a><br />
</div>
<?php } ?>

</fieldset>

<?php 
if ($_GET['ad'] == 'ud') {
include('includes/ud.inc.php');
} else if ($_GET['ad'] == 'dd') {
include('includes/dd.inc.php');
} else if ($_GET['ad'] == 'wd') {
include('includes/wd.inc.php');
} else if ($_GET['ad'] == 'fd') {
include('includes/fd.inc.php');
} else if ($_GET['ad'] == 'cd') {
include('includes/cd.inc.php');
} else if ($_GET['ad'] == 'od') {
include('includes/od.inc.php');
} else if ($_GET['ad'] == 'ld') {
include('includes/ld.inc.php');
} else if ($_GET['ad'] == 'ldu') {
include('includes/ldu.inc.php');
} else if ($_GET['ad'] == 'ldc') {
include('includes/ldc.inc.php');
} else if ($_GET['ad'] == 'lde') {
include('includes/lde.inc.php');
} else if ($_GET['ad'] == 'pd') {
include('includes/pd.inc.php');
} else if ($_GET['ad'] == 'nd') {
include('includes/nd.inc.php');
} else if ($_GET['ad'] == 'cu') {
include('includes/cu.inc.php');
} else if ($_GET['ad'] == 'kg') {
include('includes/kg.inc.php');
} else if ($_GET['ad'] == 'st') {
include('includes/st.inc.php');
} else if ($_GET['ad'] == 'cm') {
include('includes/cm.inc.php');
} else if ($_GET['ad'] == 'ac') {	//manage accounts
include('includes/ac.inc.php');
} else if ($_GET['ad'] == 'pm') {	//manage payments
include('includes/pm.inc.php');
} else {
include('includes/home.inc.php');
}
?>